package com.example.demo.control;

import com.example.demo.Result.Response;
import com.example.demo.pojo.Invoice;
import com.example.demo.service.InvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("/invoice")
public class InvoiceController {
    @Autowired
    private InvoiceService invoiceService;

    @PostMapping("/selectOne")
    public Response SelectOnlyInvoice(@RequestParam(value = "FPHM") String fphm,@RequestParam(value = "FPBM") String fpbm)
    {
        return Response.success(invoiceService.selectOnly(fphm,fpbm)) ;
    }

    @GetMapping("/test")
    public void test1 () {
        invoiceService.test();
    }
}
